<%@ page contentType="text/html; charset=UTF-8"%>
<jsp:directive.page import="com.syzg.base.merge.model.Organization"/>
<%@ include file="/base/jsp/common/Taglibs.jsp"%>
<%
response.setHeader("pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0L);%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<title>test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" src="${ctx}/base1/js/xtree/xtree.js"></script>
    <script type="text/javascript" src="${ctx}/base1/js/xtree/xloadtree.js"></script>
    <script type="text/javascript" src="${ctx}/base1/js/xtree/xmlextras.js"></script>
    <link href="${ctx}/base1/js/xtree/xtree.css" rel="stylesheet" type="text/css">
<script>

function selectItem(item){
    window.parent.content.document.location = "${ctx}/sys/users!listSelect.action?selectType=" +　parent.document.getElementById("selectType").value + "&returnType=" +　parent.document.getElementById("returnType").value + "&orgId=" + item;  
}

</script>    
    
</head>
<body>

<%
  Organization rootOrg = (Organization)request.getAttribute("organization");
  String src = request.getContextPath() + "/sys/organization!getChildOrganizationList.action?parentId=" + rootOrg.getId();
  String action="javascript:selectItem('" + rootOrg.getId() + "')";
  String Script="selectItem('" + rootOrg.getId() + "')";
  String nodeid= String.valueOf(rootOrg.getId());
%>

<script type="text/javascript">

/// XP Look
    webFXTreeConfig.rootIcon		= "${ctx}/base1/js/xtree/images/xp/folder.png";
    webFXTreeConfig.openRootIcon	= "${ctx}/base1/js/xtree/images/xp/openfolder.png";
    webFXTreeConfig.folderIcon		= "${ctx}/base1/js/xtree/images/xp/folder.png";
    webFXTreeConfig.openFolderIcon	= "${ctx}/base1/js/xtree/images/xp/openfolder.png";
    webFXTreeConfig.fileIcon		= "${ctx}/base1/js/xtree/images/xp/file.png";
    webFXTreeConfig.lMinusIcon		= "${ctx}/base1/js/xtree/images/xp/Lminus.png";
    webFXTreeConfig.lPlusIcon		= "${ctx}/base1/js/xtree/images/xp/Lplus.png";
    webFXTreeConfig.tMinusIcon		= "${ctx}/base1/js/xtree/images/xp/Tminus.png";
    webFXTreeConfig.tPlusIcon		= "${ctx}/base1/js/xtree/images/xp/Tplus.png";
    webFXTreeConfig.iIcon			= "${ctx}/base1/js/xtree/images/xp/I.png";
    webFXTreeConfig.lIcon			= "${ctx}/base1/js/xtree/images/xp/L.png";
    webFXTreeConfig.tIcon			= "${ctx}/base1/js/xtree/images/xp/T.png";
    webFXTreeConfig.blankIcon       = "${ctx}/base1/js/xtree/images/xp/blank.png";

    //var tree = new WebFXLoadTree("WebFXLoadTree", "tree1.xml");
    //tree.setBehavior("classic");

    var rti;
    var tree = new WebFXLoadTree("<%=rootOrg.getName()%>", "<%=src%>","<%=action%>", null, null, null);
    document.write(tree);
    //tree.expand();
</script>
	</body>
</html>
